home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / angelpang.swf / scripts / frame_8 / PlaceObject2_267_568 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2006-06-13  |  2.0 KB  |  81 lines

  1. onClipEvent(enterFrame){
  2.    if(_parent.move_play)
  3.    {
  4.       if(ishit)
  5.       {
  6.          if(this._x > 632 || this._x < 0)
  7.          {
  8.             ishit = false;
  9.             this.play();
  10.          }
  11.          if(this.hit.hitTest(_parent.hero.Hit))
  12.          {
  13.             _parent.canPlay = false;
  14.             _parent.player_move = false;
  15.             _parent.hero.gotoAndStop("die");
  16.          }
  17.          g += _parent.GGG;
  18.          this._x += speedX;
  19.          sn = Math.abs(Math.cos(3.141592653589793 * g / 180));
  20.          this._y = _parent.Hit._y + 45 - sn * dis;
  21.          if(g % 360 == 90 || g % 360 == 270)
  22.          {
  23.             dis = 120;
  24.          }
  25.          if(this.hitTest(_parent.hit_L))
  26.          {
  27.             speedX = _root.big1 + zzz_num;
  28.          }
  29.          if(this.hitTest(_parent.hit_R))
  30.          {
  31.             speedX = - _root.big1 + (- zzz_num);
  32.          }
  33.       }
  34.    }
  35.    if(Att_hit)
  36.    {
  37.       if(this.hitTest(_parent.arrow_1.hit))
  38.       {
  39.          _parent.arrow_1.gotoAndStop(1);
  40.          this.play();
  41.          ishit = false;
  42.       }
  43.       if(this.hitTest(_parent.arrow_2.hit))
  44.       {
  45.          _parent.arrow_2.gotoAndStop(1);
  46.          this.play();
  47.          ishit = false;
  48.       }
  49.       if(this.hitTest(_parent.arrow_3.hit))
  50.       {
  51.          _parent.arrow_3.gotoAndStop(1);
  52.          this.play();
  53.          ishit = false;
  54.       }
  55.       if(this.hitTest(_parent.arrow_4.hit))
  56.       {
  57.          _parent.arrow_4.gotoAndStop(1);
  58.          this.play();
  59.          ishit = false;
  60.       }
  61.       if(this.hitTest(_parent.arrow_5.hit))
  62.       {
  63.          _parent.arrow_5.gotoAndStop(1);
  64.          this.play();
  65.          ishit = false;
  66.       }
  67.       if(this.hitTest(_parent.arrow_7.hit))
  68.       {
  69.          _parent.arrow_7.gotoAndStop(1);
  70.          this.play();
  71.          ishit = false;
  72.       }
  73.       if(this.hitTest(_parent.arrow_8.hit))
  74.       {
  75.          _parent.arrow_8.gotoAndStop(1);
  76.          this.play();
  77.          ishit = false;
  78.       }
  79.    }
  80. }
  81.